-- GENERATED SPELL FOR [Coilskar Harpooner] --


function spell0_22874(pUnit, Event) --@Harpooner\'s Mark,n/a--
pUnit:FullCastSpellOnTarget(40084,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22874', 0, 1)
end

function spell1_22874(pUnit, Event) --@Hooked Net,n/a--
pUnit:FullCastSpellOnTarget(40082,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22874', 6500, 1)
end

function spell2_22874(pUnit, Event) --@Spear Throw,n/a--
pUnit:FullCastSpellOnTarget(40083,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_22874', 615, 1)
end

function Sorts_22874(pUnit, Event)
local choix_sorts_22874 = math.random(0, 2)
if choix_sorts_22874 == 0 then
pUnit:RegisterEvent('spell0_22874', 1, 1)
end
if choix_sorts_22874 == 1 then
pUnit:RegisterEvent('spell1_22874', 1, 1)
end
if choix_sorts_22874 == 2 then
pUnit:RegisterEvent('spell2_22874', 1, 1)
end
end

function mob22874_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_22874', math.random(1500, 3000), 1)
end

function mob22874_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22874_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob22874_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(22874, 1, 'mob22874_Action')
RegisterUnitEvent(22874, 2, 'mob22874_Leave')
RegisterUnitEvent(22874, 3, 'mob22874_Kill')
RegisterUnitEvent(22874, 4, 'mob22874_Die')
